home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / dframe39.zip / PBC-SUBS.DOC < prev    next >
Text File  |  1992-09-25  |  43KB  |  1,345 lines

  1.  
  2.  The following routines are available for your use. DoorFrame itself does not
  3. use most of the routines so you may retain or delete them from DFRAME.LIB as
  4. you see fit (the ones DoorFrame uses are noted - DON'T DELETE THEM!). The
  5. library is modularized so if you don't CALL a routine in your code, it will
  6. not be included in the final .EXE file. Since these routines come from the
  7. PBClone library by Tom Hanlin, I have taken the liberty of including his
  8. descriptions of the routines.
  9.  
  10. Name  : BigPrint             (Called by DoorFrame - DON'T DELETE!)
  11. Class : Display
  12. Level : BIOS
  13.  
  14. As the name suggests, this routine displays text in large
  15. characters.  How large?  Eight times as high and as wide as
  16. normal!  Each "big character" will be composed of many
  17. normal-sized characters.  You may choose the normal character
  18. used to create the big characters (the default is a CHR$(219)
  19. solid block character, if you pass a null string here).
  20.  
  21. You should avoid using CHR$(128) to CHR$(255) when in either of
  22. the CGA graphics modes, as many CGAs are unable to display
  23. these characters when in graphics mode.
  24.  
  25.    BigPrint St$, FormCh$, Row%, Column%, Attr%
  26.  
  27. St$       string to display in big characters
  28. FormCh$   character used to compose the big characters
  29. Row%      starting row
  30. Column%   starting column
  31. Attr%     color/attribute of big characters (see CalcAttr)
  32.           NOTE: This is a local only procedure. It will NOT be sent to the
  33.                 remote computer!
  34.  
  35.  
  36. Name  : CalcAttr                (Called by DoorFrame - DON'T DELETE!)
  37. Class : Display
  38. Level : Any
  39.  
  40. An attribute is a combination of the foreground and background colors in a 
  41. format which is used by all types of displays when in text mode. 
  42.  
  43. Foreground colors are usually specified as 0-15, with backgrounds as 0-7.
  44.  
  45.    CalcAttr Foreground%, Background%, Attr%
  46.  
  47. Foreground%  foreground color
  48. Background%  background color
  49. -------
  50. Attr%        color "attribute"
  51.  
  52.  
  53. Name  : CalcDate             (Calculate Date)
  54. Class : Time
  55. Level : Any
  56.  
  57. This routine calculates what the date will be a given number of
  58. days from now, either in the past or the future.  Actually, you
  59. may use any starting date, not just the current date.  An error
  60. code is returned if the starting date or resulting date are not
  61. valid.  Dates may not preceed January 1, 1900.
  62.  
  63. CalcDate accepts the date in any standard form ("01/30/91" or
  64. "01-30-1991", for example) and returns its results in the same
  65. format.
  66.  
  67.    CalcDate StartDate$, Days&, Direction%, NewDate$, ErrCode%
  68.  
  69. StartDate$   starting date
  70. Days&        number of days from the current date (0 or more)
  71. Direction%   return future result (0) or past (nonzero)
  72. -------
  73. NewDate$     resulting date
  74. ErrCode%     whether the dates are valid (0 yes)
  75.  
  76.  
  77. Name  : CDROM
  78. Class : Disk / Equipment
  79. Level : DOS
  80.  
  81. This routine tells you whether the Microsoft CD-ROM Extensions are installed.
  82. If so, it tells you what the letter of the first CD-ROM logical drive is and
  83. how many logical drives exist.
  84.  
  85. Note: The CD-ROM installation check conflicts with the GRAPHICS.COM
  86. installation check for DOS 4.0, due to some screw-up at IBM or Microsoft.
  87. This may cause unexpected results.  I'm not yet sure whether DOS 5.0 is
  88. similarly afflicted.
  89.  
  90.    FirstDrive$ = "x"
  91.    CDROM FirstDrive$, Drives%
  92.  
  93. -------
  94. FirstDrive$   letter of the first logical drive (init to at least one space!)
  95. Drives%       number of logical drives available (0 if no CD-ROM is there)
  96.  
  97.  
  98. Name  : CheckDate            (Check Date validity)
  99. Class : Time
  100. Level : Any
  101.  
  102. This routine checks a date to see if it is valid.
  103.  
  104.    CheckDate MonthNr%, DayNr%, YearNr%, ErrCode%
  105.  
  106. MonthNr%     month number (1-12)
  107. DayNr%       day number (1-31)
  108. YearNr%      year number (1900 on; years <100 assumed 1900s)
  109. -------
  110. ErrCode%     whether the date is valid (0 yes)
  111.  
  112.  
  113. Name  : CheckShare           (Check for SHARE)
  114. Class : Disk
  115. Level : DOS
  116.  
  117. The CheckShare routine determines whether SHARE.EXE is active.
  118. This is particularly helpful before using the BASIC OPEN
  119. statement, which will fail if you request file sharing when
  120. it's not available.  The PBClone file routines handle such
  121. situations automatically, so CheckShare is not needed for them.
  122.  
  123.    CheckShare ShareActive%
  124.  
  125. -------
  126. ShareActive%   whether SHARE is active (0 if no)
  127.  
  128.  
  129. Name  : CheckShare2%         (Check for SHARE)
  130. Class : Disk
  131. Level : DOS
  132.  
  133. The CheckShare2% function determines whether SHARE.EXE is active.  This is
  134. particularly helpful before using the BASIC OPEN statement, which will fail
  135. if you request file sharing when it's not available.  The PBClone file
  136. routines handle such situations automatically, so CheckShare2% is not needed
  137. for them.
  138.  
  139.    ShareActive% = CheckShare2%
  140.  
  141. -------
  142. ShareActive%   whether SHARE is active (0 if no)
  143.  
  144.  
  145. Name  : DateA2R              (Date Actual to Relative)
  146. Class : Time
  147. Level : Any
  148.  
  149. This routine converts an actual date to a relative date,
  150. expressed as a number of days.  This allows you to compare
  151. dates, find out what the date will be in a given number of days
  152. (or what it was a given number of days ago), see how many days
  153. passed between two dates, and so forth.
  154.  
  155. I've frequently seen routines of this nature called "Julian
  156. date" routines. I'm not sure where that nomenclature
  157. originated, as it has nothing to do with the Julian calendar.
  158. Most of these routines rely on approximations through floating
  159. point math, and may or may not handle leap years and centuries
  160. appropriately.  The DateA2R routine takes no such shortcuts and
  161. may be relied upon to return accurate results.
  162.  
  163.    DateA2R MonthNr%, DayNr%, YearNr%, RelDate&
  164.  
  165. MonthNr%     month number (1-12)
  166. DayNr%       day number (1-31)
  167. YearNr%      year number (1900 on; years <100 assumed in 1900s)
  168. -------
  169. RelDate&     relative date
  170.  
  171.  
  172. Name  : DateN2S              (Date Numbers to String)
  173. Class : Time
  174. Level : Any / DOS
  175.  
  176. Many of the PBClone routines return the date as a set of
  177. numbers.  This routine provides an easy way to convert those
  178. numbers into string form.  The date format used (year length
  179. and delimiter) will be based on the string which you pass to
  180. the routine.  For instance, "xx-xx-xxxx" will return a date
  181. like "11-26-1990", whereas "xx.xx.xxxx" would return
  182. "11.26.1990", and "xx/xx/xx" would return "11/26/90".
  183.  
  184. If you pass zeroes for the MonthNr%, Day%, and Year% values,
  185. the current date will be returned in the format that you
  186. specified.
  187.  
  188. The ProBas and PBClone versions of this routine do not work the
  189. same way in regards to the year.  ProBas assumed that any
  190. two-digit year was in the 1900s.  In contrast, PBClone assumes
  191. that years 80-99 should be converted to 1980-1999 and that 0-79
  192. should be converted to 2000-2079.
  193.  
  194.    DateSt$ = "xx-xx-xxxx"
  195.    DateN2S MonthNr%, Day%, Year%, DateSt$
  196.  
  197. MonthNr%  month
  198. Day%      day
  199. Year%     year
  200. -------
  201. DateSt$   date string.  Init to 8 or 10 chars (see above).
  202.  
  203.  
  204. Name  : DateR2A              (Date Relative to Actual)
  205. Class : Time
  206. Level : Any
  207.  
  208. This is the opposite of the DateA2R routine-- it takes a
  209. "relative" date and converts it back to the usual form.
  210.  
  211.    DateR2A MonthNr%, DayNr%, YearNr%, RelDate&
  212.  
  213. RelDate&     relative date
  214. -------
  215. MonthNr%     month number (1-12)
  216. DayNr%       day number (1-31)
  217. YearNr%      year number (1900 on)
  218.  
  219.  
  220. Name  : DateS2N              (Date String to Numbers)
  221. Class : Time
  222. Level : Any
  223.  
  224. Many of the PBClone routines need to be passed the date as a
  225. set of numbers. This routine provides an easy way to convert a
  226. date from string form into numbers.  You may use either
  227. "xx/xx/xx" or "xx-xx-xxxx" form to specify the date (the string
  228. length is important, but the delimiter and contents of the
  229. string are ignored).
  230.  
  231. The ProBas and PBClone versions of this routine do not work the
  232. same way in regards to the year.  ProBas assumed that any
  233. two-digit year was in the 1900s.  In contrast, PBClone assumes
  234. that years 80-99 should be converted to 1980-1999 and that 0-79
  235. should be converted to 2000-2079.
  236.  
  237.    DateS2N MonthNr%, Day%, Year%, DateSt$
  238.  
  239. DateSt$   date string.  Init to 8 or 10 characters (see above).
  240. -------
  241. MonthNr%  month
  242. Day%      day
  243. Year%     year
  244.  
  245.  
  246. Name  : DelFile
  247. Class : Disk
  248. Level : DOS
  249.  
  250. This works like the DOS DEL (or ERASE) command, although it does not allow
  251. wildcards.  The specified file is deleted.  Full path specifications are
  252. supported, including drive and subdirectory specs.
  253.  
  254.    DelFile FileName$, ErrCode%
  255.  
  256. FileName$   name of the file to delete
  257. -------
  258. ErrCode%    0 if no error, else DOS Error
  259.  
  260.  
  261. Name  : DriveSpace&
  262. Class : Disk
  263. Level : DOS
  264.  
  265. This routine tells you how many bytes are free on a specified disk drive.
  266.  
  267.    BytesFree& = DriveSpace&(Drive$)
  268.  
  269. Drive$      letter of the drive to examine
  270. -------
  271. BytesFree&  free bytes on the specified drive, or -1 if bad drive or disk error
  272.  
  273.  
  274. Name  : DrvType              (Drive Type)
  275. Class : Disk
  276. Level : DOS 3.1+
  277.  
  278. The DrvType routine tells you whether a specified drive is
  279. fixed or removeable, and whether it is local or remote (network
  280. drive).
  281.  
  282.    DrvType Drive$, Removeable%, Remote%, ErrCode%
  283.  
  284. Drive$       letter of the drive to examine
  285. -------
  286. Removeable%  whether the disk can be removed (0 if no)
  287. Remote%      whether this is a remote drive (0 if no)
  288. ErrCode%     error code: 0 if none, else bad DOS version
  289.  
  290. Name  : Elapsed              (Elapsed time)
  291. Class : Time
  292. Level : Any
  293.  
  294. This routine tells you the amount of time elapsed between a
  295. given starting time and ending time.  The difference between
  296. the times must be less than 24 hours for the results to be
  297. meaningful.
  298.  
  299.    Elapsed TimeStart$, TimeStop$, TimeDiff$
  300.  
  301. TimeStart$   starting time
  302. TimeStop$    ending time
  303. -------
  304. TimeDiff$    elapsed time
  305.  
  306. Name  : EMSBuffer
  307. Class : Memory
  308. Level : BIOS
  309.  
  310. EMSBuffer tells you how many bytes are needed to save the state of the EMS
  311. array routines.  Used in conjunction with EMSSave and EMSRest, it allows you
  312. to preserve EMS arrays across a CHAIN to another part of your program.
  313.  
  314.    EMSBuffer Bytes%
  315.    EMSState$ = SPACE$(Bytes%)
  316.    EMSSave EMSState$
  317.  
  318. -------
  319. Bytes%       bytes needed to save EMS array state
  320.  
  321. Name  : EMSClose
  322. Class : Memory
  323. Level : BIOS
  324.  
  325. The EMSClose routine is used when you are finished with an EMS array.  It
  326. frees the array handle and EMS memory for other uses.  If you don't close all
  327. EMS arrays before your program ends, the memory will be lost until the system
  328. is rebooted, so it is important to remember EMSClose.
  329.  
  330.    EMSClose ArrayHandle%
  331.  
  332. ArrayHandle%    handle of an EMS array
  333.  
  334.  
  335. Name  : EMSGet
  336. Class : Memory
  337. Level : BIOS
  338.  
  339. This routine gets an element from an EMS array created by EMSOpen.  Element
  340. numbers start at 0.  Be sure to use the right numeric type for the array--
  341. for instance, if you opened the array for SINGLE precision, use "Value!".
  342.  
  343.    EMSGet ArrayHandle%, ElementNr&, Value
  344.  
  345. ArrayHandle%    handle of an EMS array
  346. ElementNr&      element number to get
  347. -------
  348. Value           value to get element into (must be correct type for array)
  349.  
  350.  
  351. Name  : EMSOpen
  352. Class : Memory
  353. Level : BIOS
  354.  
  355. This routine allows you to open a block of EMS (expanded) memory which can
  356. then be accessed like a numeric array.  The array size is limited only by
  357. available EMS memory (use GetLIMM to find out how much is available).  You
  358. may specify any numeric type:
  359.  
  360.     1   INTEGER
  361.     2   LONG or SINGLE
  362.     3   DOUBLE
  363.  
  364. When the array is opened, you are returned an "array handle" which is used to
  365. access that array.  Access to the array is done via EMSGet and EMSPut.  When
  366. you are finished with the array, you must close it with EMSClose.
  367.  
  368. As many as 25 EMS arrays can be in use at one time, subject to limitations
  369. which may be imposed by your EMS driver (each array requires one EMS handle).
  370.  
  371.    EMSOpen Elements&, ElementType%, ArrayHandle%, ErrCode%
  372.  
  373. Elements&       number of elements in array (like DIM size)
  374. ElementType%    numeric type of array (see above)
  375. -------
  376. ArrayHandle%    handle of an EMS array
  377. ErrCode%        whether an error occurred (0 no)
  378.  
  379.  
  380. Name  : EMSPut
  381. Class : Memory
  382. Level : BIOS
  383.  
  384. This routine puts an element into an EMS array created by EMSOpen.  Element
  385. numbers start at 0.  Be sure to use the right numeric type for the array--
  386. for instance, if you opened the array for SINGLE precision, use "Value!".
  387.  
  388.    EMSPut ArrayHandle%, ElementNr&, Value
  389.  
  390. ArrayHandle%    handle of an EMS array
  391. ElementNr&      element number to set
  392. Value           value to set element to (must be correct type for array)
  393.  
  394.  
  395. Name  : EMSRest
  396. Class : Memory
  397. Level : BIOS
  398.  
  399. This routine allows you to restore the state of the EMS array handler.  Used
  400. in conjunction with EMSBuffer and EMSSave, it allows you to preserve EMS
  401. arrays across a CHAIN to another part of your program.
  402.  
  403.    EMSRest EMSState$
  404.  
  405. EMSState$    saved EMS array state
  406.  
  407.  
  408. Name  : EMSSave
  409. Class : Memory
  410. Level : BIOS
  411.  
  412. This routine allows you to save the state of the EMS array handler.  Used in
  413. conjunction with EMSBuffer and EMSRest, it allows you to preserve EMS arrays
  414. across a CHAIN to another part of your program.
  415.  
  416.    EMSBuffer Bytes%
  417.    EMSState$ = SPACE$(Bytes%)
  418.    EMSSave EMSState$
  419.  
  420. -------
  421. EMSState$    saved EMS array state
  422.  
  423.  
  424. Name  : EnhKbd
  425. Class : Input
  426. Level : BIOS
  427.  
  428. By default, the PBClone routines assume an old-style keyboard is in use, for
  429. greatest compatibility.  EnhKbd allows you to turn on enhanced keyboard
  430. handling for the current generation of (usually) 101-key keyboards.  This
  431. allows access to the F11 and F12 function keys as well as codes for key
  432. combinations that used to be ignored, among other things.
  433.  
  434. The KbdType or KbdType2% routine can be used to determine if an enhanced
  435. keyboard is available (recommended).
  436.  
  437. Note that EnhKbd works by intercepting the BIOS keyboard handler.  All calls
  438. to the BIOS keyboard interrupt are converted from the old keyboard functions
  439. to the new ones.  YOU MUST DISABLE EnhKbd BEFORE YOUR PROGRAM ENDS, so it can
  440. restore the old setup.  Otherwise, the computer will most probably crash.
  441.  
  442.    EnhKbd Enable%
  443.  
  444. Enable%     turn on enhanced keyboard support (0 disable, else enable)
  445.  
  446.  
  447. Name  : EuropeDate           (European Date format)
  448. Class : Time
  449. Level : Any
  450.  
  451. This routine takes a date in one of the American formats
  452. ("MM/DD/YY" or "MM-DD-YYYY") and converts it to the European
  453. convention ("DD.MM.YY" or "DD.MM.YYYY").  The date is formatted
  454. according to a format string which provides the desired
  455. delimiter and year length, e.g. "##-##-##" specifies a
  456. delimiter of "-" and a year length of two digits.
  457.  
  458. An error code is returned if the date is not valid.
  459.  
  460.    EuropeDate DateSt$, Format$, Result$, ErrCode%
  461.  
  462. DateSt$     date to format (month, day, year order)
  463. Format$     format for the date
  464. -------
  465. Result$     resulting date (day, month, year order)
  466. ErrCode     whether the date is valid (0 ok)
  467.  
  468.  
  469. Name  : Exist2%              (file Existence)
  470. Class : Disk
  471. Level : DOS
  472.  
  473. Most versions of BASIC give you no way of seeing if a file
  474. exists before you try to OPEN it, so you end up taking your
  475. chances.  The Exist2% function allows you to test to see if the
  476. file exists beforehand.  It isn't really necessary for the
  477. PBClone file routines, which will return an appropriate error
  478. code, but it's an important safeguard when using the OPEN
  479. statement.
  480.  
  481. The Exist2% routine does not support wildcards.  If you need
  482. that feature, try the FindFirstFx and FindNextFx routines
  483. instead.
  484.  
  485.    Found% = Exist2%(FileName$)
  486.  
  487. FileName$   name of the file to look for
  488. -------
  489. Found%      whether the file was found (0 if no)
  490.  
  491.  
  492. Name  : FormatDate           (Format Date)
  493. Class : Time
  494. Level : Any
  495.  
  496. This is a highly flexible date formatting routine.  It accepts
  497. a date in one of the usual American formats ("03-22-1990",
  498. "03/22/90", or even "3/22/90") and converts it according to a
  499. format string.  This format string allows you to normalize the
  500. date, select a new delimiter, choose between two-digit and
  501. four-digit years, and even change the order from month/day/year
  502. to anything else.  An error code will be returned if the date
  503. is not valid.
  504.  
  505. The format string can be as simple as "##/##/##", which
  506. specifies that the usual month/day/year order be used, with a
  507. delimiter of "/" and a two-digit year.  If you want to change
  508. the date order, you would need a format like "DD.MM.YYYY"
  509. instead.  For sorting or storage, you might want to convert the
  510. date to a plain number, using a format string like "YYYYMMDD".
  511. The result could then be converted to a LONG with the BASIC VAL
  512. function.
  513.  
  514.    FormatDate DateSt$, Format$, Result$, ErrCode%
  515.  
  516. DateSt$     date to format (month, day, year order)
  517. Format$     format for the date
  518. -------
  519. Result$     resulting date
  520. ErrCode     whether the date is valid (0 ok)
  521.  
  522.  
  523. Name  : FindFirstF           (Find First File)
  524. Class : Disk
  525. Level : DOS
  526.  
  527. This is part of a set of routines included for compatibility
  528. with ADVBAS and ProBas.  A better solution may be found in
  529. FindFirstFx.
  530.  
  531. The FindFirstF routine is used to find the first file that
  532. matches search parameters which you specify.  Various
  533. information about the file that matches (if any) can be
  534. retrieved by other routines.  See also FindNextF.
  535.  
  536. The file name specified may contain a drive and subdirectory
  537. specification. Wildcards are also allowed.
  538.  
  539. Possible search attributes are as follows:
  540.  
  541.    Normal          0      (nothing special)
  542.    Hidden          2      file is "invisible"
  543.    System          4      special DOS system file
  544.    Subdirectory   16      subdirectory
  545.  
  546. You can combine the attributes by adding them together.  All
  547. searches will match if any of the specified attributes are
  548. found, so if you're looking only for a specific attribute, you
  549. will need to test the results using GetAttrF.
  550.  
  551.  
  552. Routines in this series include:
  553.    FindFirstF, FindNextF, GetNameF, GetAttrF, GetDateF,
  554.    GetTimeF, GetSizeFL
  555.  
  556.    FindFirstF FileName$, Attr%, ErrCode%
  557.  
  558. FileName$   name of file(s) for which to search
  559. Attr%       file attribute(s) to seek
  560. -------
  561. ErrCode%    error code (0 if no error, else no matching files)
  562.  
  563.  
  564. Name  : FindNextF            (Find Next File)
  565. Class : Disk
  566. Level : DOS
  567.  
  568. This routine is for use after FindFirstF, to find any
  569. additional files which may match your search specifications.
  570. Routines in this series include:
  571.    FindFirstF, FindNextF, GetNameF, GetAttrF, GetDateF,
  572.    GetTimeF, GetSizeFL
  573.  
  574.    FindNextF ErrCode%
  575.  
  576. -------
  577. ErrCode%    error code (0 if no error, else no matching files)
  578.  
  579. Name  : Get4DOSv             (Get 4DOS Version)
  580. Class : Equipment
  581. Level : DOS
  582.  
  583. The Get4DOSv routine returns the version of 4DOS being used.  It returns the
  584. results as two integers containing the major and minor version numbers. For
  585. instance, 4DOS 4.0 would return a major number of 4, minor 0.  If 4DOS is not
  586. installed, both version numbers will be zero.
  587. If you're not familiar with 4DOS, it's a terrific improved replacement for
  588. COMMAND.COM.  For more information, write JP Software Inc., P.O. Box 1470,
  589. Arlington MA 02174, or call your local BBS.
  590.  
  591.    Get4DOSv MajorV%, MinorV%
  592.  
  593. -------
  594. MajorV%   major part of the 4DOS version
  595. MinorV%   minor part of the 4DOS version
  596.  
  597. Name  : GetattrF             (Get Attribute of File)
  598. Class : Disk
  599. Level : DOS
  600.  
  601. The GetAttrF routine returns the attributes of a file matched
  602. by FindFirstF or FindNextF.
  603.    Normal          0      (nothing special)
  604.    Read Only       1      file can be read, but not written to
  605.    Hidden          2      file is "invisible"
  606.    System          4      special DOS system file
  607.    Subdirectory   16      subdirectory
  608.    Archive        32      (used by some backup utilities)
  609. You can see if a certain value is set using the AND operator:
  610.  
  611.    IF Attr% AND 16 THEN PRINT "Subdirectory"
  612.  
  613. Since the values are all powers of two, the AND operator makes
  614. for a convenient way of decoding the results.
  615. See also the ExplainFAttr$ function, which decodes the meanings
  616. of the attribute for you.
  617.  
  618. Routines in this series include:
  619.    FindFirstF, FindNextF, GetNameF, GetAttrF, GetDateF, GetTimeF, GetSizeFL
  620.  
  621.    GetAttrF Attr%
  622.  
  623. -------
  624. Attr%   attributes that are set
  625.  
  626. Name  : GetDateF             (Get Date of File)
  627. Class : Disk / Time
  628. Level : DOS
  629. The GetDateF routine returns the date of a file matched by
  630. FindFirstF or FindNextF.
  631.  
  632. Routines in this series include:
  633.    FindFirstF, FindNextF, GetNameF, GetAttrF, GetDateF, GetTimeF, GetSizeFL
  634.  
  635.    GetDateF MonthNr%, Day%, Year%
  636.  
  637. -------
  638. MonthNr%    month
  639. Day%        day
  640. Year%       year
  641.  
  642. Name  : GetDOSV                 (Called by DoorFrame - DON'T DELETE!)
  643. Class : Equipment
  644. Level : DOS
  645.  
  646. The GetDOSV routine tells you what version of DOS you're using.  It returns
  647. the results as two integers containing the major and minor version numbers.
  648. For instance, MS-DOS 2.11 would return a major number of 2, minor 11.
  649. The OS/2 compatibility box returns version numbers beginning at 10.00.  For
  650. instance, OS/2 v1.1 returns 10.10 and OS/2 v2.0 returns 20.00.
  651.  
  652.    GetDOSV MajorV%, MinorV%
  653.  
  654. -------
  655. MajorV%   major part of the DOS version
  656. MinorV%   minor part of the DOS version
  657.  
  658. Name  : Getdrv               (Get default Drive)
  659. Class : Disk
  660. Level : DOS
  661.  
  662. This routine tells you the letter of the current default drive.
  663.  
  664.    Drive$ = "x"
  665.    GetDrv Drive$
  666.  
  667. -------
  668. Drive$    default drive letter.  Init to at least one character.
  669.  
  670. Name  : GetDView
  671. Class : Miscellaneous
  672. Level : DOS
  673. The GetDView routine tells you what version of DESQview is loaded.  It
  674. returns the results as two integers containing the major and minor version
  675. numbers.  For instance, DESQview 2.0 would return a major number of 2 and a
  676. minor number of 0.  If DESQview is not loaded, zeroes are returned.
  677.  
  678. See also GetTView, GetTVScreen, UpdTVScreen.
  679.  
  680.    GetDView MajorV%, MinorV%
  681.  
  682. -------
  683. MajorV%   major part of the DESQview version (0 if DESQview is not loaded)
  684. MinorV%   minor part of the DESQview version
  685.  
  686. Name  : GetexecPath          (Get Execution Path of program)
  687. Class : Disk
  688. Level : DOS 3.0+
  689. This routine returns the full path of your program, i.e., the
  690. drive, subdirectory, and name of the program.  It does not rely
  691. on the current drive and subdirectory settings or look at the
  692. PATH setting-- DOS tells it directly.  This makes it an
  693. excellent way to find the program's "home" directory, where
  694. (hopefully) any data files associated with the program will
  695. also be stored.
  696.  
  697.    SelfName$ = SPACE$(80)
  698.    GetExecPath SelfName$, SelfLen%
  699.    SelfName$ = LEFT$(SelfName$, SelfLen%)
  700.  
  701. -------
  702. SelfName$   full path for current program.  Init to 80+ chars.
  703. SelfLen%    length of the full path spec.
  704.  
  705. Name  : GetKbd
  706. Class : Input
  707. Level : Clone
  708. The GetKbd routine allows you to get the state of the four keyboard toggles:
  709. Insert, Caps lock, Num lock, and Scroll Lock.
  710.  
  711.    GetKbd Insert%, Caps%, Num%, Scrl%
  712.  
  713. -------
  714. Insert%    whether "insert" mode is on (0 if no)
  715. Caps%      whether "caps lock" is on (0 if no)
  716. Num%       whether "num lock" is on (0 if no)
  717. Scrl%      whether "scroll lock" is on (0 if no)
  718.  
  719.  
  720. Name  : GetKbd1
  721. Class : Input
  722. Level : Clone
  723.  
  724. The GetKbd1 routine allows you to get the state of the four keyboard shift
  725. keys: Left shift, Right shift, Control and Alt.
  726.  
  727.    GetKbd1 LShift%, RShift%, Control%, Alt%
  728.  
  729. -------
  730. LShift%    whether the left shift key is depressed (0 if no)
  731. RShift%    whether the right shift key is depressed (0 if no)
  732. Control%   whether a control key is depressed (0 if no)
  733. Alt%       whether an alt key is depressed (0 if no)
  734.  
  735.  
  736. Name  : GetKbd2
  737. Class : Input
  738. Level : AT BIOS
  739.  
  740. The GetKbd2 routine allows you to get the state of the six keyboard shift
  741. keys on an "enhanced" keyboard: Left shift, Right shift, Left Control, Right
  742. Control, Left Alt and Right Alt.
  743.  
  744. Normally, the BIOS only lets you see one key at a time, which can be a
  745. barrier when you need more input.  This is a particular problem with action
  746. games and other real-time applications which have complex input requirements.
  747. Due to the special way the BIOS treats shift keys, GetKbd2 can tell if the
  748. the various shift keys are pressed simultaneously, allowing more flexibility.
  749.  
  750.    GetKbd2 LShift%, RShift%, LCtrl%, RCtrl%, LAlt%, RAlt%
  751.  
  752. -------
  753. LShift%    whether the left shift key is depressed (0 if no)
  754. RShift%    whether the right shift key is depressed (0 if no)
  755. LCtrl%     whether the left control key is depressed (0 if no)
  756. RCtrl%     whether the right control key is depressed (0 if no)
  757. LAlt%      whether the left alt key is depressed (0 if no)
  758. RAlt%      whether the right alt key is depressed (0 if no)
  759.  
  760.  
  761. Name  : GetLIMHandles
  762. Class : Memory
  763. Level : DOS
  764.  
  765. Early Lotus/Intel/Microsoft expanded memory revisions provided a limited
  766. number of "handles" which could be used to access expanded memory-- often as
  767. few as 15 or so.  If your program uses expanded memory and the EMS driver is
  768. one of the older versions, you may want to make sure that enough handles are
  769. available.  This routine tells you how many handles are in use.
  770.  
  771. Note that this routine expects an EMS driver to be installed.  If you can't
  772. be sure of that, use GetLIMM first to avoid an unpleasant surprise.
  773.  
  774.    GetLIMHandles Handles%
  775.  
  776. -------
  777. Handles%  number of EMS handles in use
  778.  
  779.  
  780.  
  781. Name  : GetLIMM
  782. Class : Memory / Equipment
  783. Level : DOS
  784.  
  785. This routine tells you how much expanded memory is installed.  If there is
  786. none, or if the EMS driver hasn't been installed, it returns zeroes.  You
  787. should use this routine before any other of the PBClone routines that access
  788. expanded memory, since the other routines expect EMS to be available.
  789.  
  790. The results are returned in terms of EMS pages.  Each page is 16 kilobytes.
  791.  
  792.    GetLIMM TotalPages%, FreePages%
  793.  
  794. -------
  795. TotalPages%  number of EMS pages installed
  796. FreePages%   number of EMS pages available for use
  797.  
  798.  
  799. Name  : GetLIMV
  800. Class : Memory / Equipment
  801. Level : DOS
  802.  
  803. The GetLIMV routine tells you the version of EMS driver that is being used.
  804. The version number is separated into major and minor parts.  For example, an
  805. EMS 3.1 driver would return a major number of 3 and minor number of 1.
  806.  
  807. Note that this routine expects an EMS driver to be installed.  If you can't
  808. be sure of that, use GetLIMM first to avoid an unpleasant surprise.
  809.  
  810.    GetLIMV MajorVer%, MinorVer%
  811.  
  812. -------
  813. MajorVer%  major part of the EMS version number
  814. MinorVer%  minor part of the EMS version number
  815.  
  816.  
  817. Name  : GetNameF             (Get Name of File)
  818. Class : Disk
  819. Level : DOS
  820.  
  821. The GetNameF routine returns the name of a file matched by
  822. FindFirstF or FindNextF.  The name will not contain a drive or
  823. subdirectory specification.
  824.  
  825. Routines in this series include:
  826.    FindFirstF, FindNextF, GetNameF, GetAttrF, GetDateF,
  827.    GetTimeF, GetSizeFL
  828.  
  829.    FileName$ = SPACE$(12)
  830.    GetNameF FileName$, NameLen%
  831.    FileName$ = LEFT$(FileName$, NameLen%)
  832.  
  833. -------
  834. FileName$   file name (init to at least 12 characters)
  835. NameLen%    length of file name
  836.  
  837.  
  838. Name  : GetsizeFL            (Get Size of File as Long)
  839. Class : Disk
  840. Level : DOS
  841.  
  842. The GetSizeFL routine returns the size of a file matched by
  843. FindFirstF or FindNextF.
  844.  
  845. Routines in this series include:
  846.    FindFirstF, FindNextF, GetNameF, GetAttrF, GetDateF,
  847.    GetTimeF, GetSizeFL
  848.  
  849.    GetSizeFL FileSize&
  850.  
  851. -------
  852. FileSize&   file size
  853.  
  854.  
  855. Name  : Getsub               (Get default Subdirectory)
  856. Class : Disk
  857. Level : DOS
  858.  
  859. The GetSub routine gets the current subdirectory on the default
  860. drive.  It does not put a backslash at the start of the
  861. subdirectory, so you should add this yourself.
  862.  
  863. See also GetSub1, which is a more advanced version of this
  864. routine.
  865.  
  866.    SubDir$ = SPACE$(64)
  867.    GetSub SubDir$, SubLen%
  868.    SubDir$ = "\" + LEFT$(SubDir$, SubLen%)
  869.  
  870. -------
  871. SubDir$    name of the current subdirectory. Init to 64+ chars
  872. SubLen%    length of the subdirectory name
  873.  
  874.  
  875. Name  : GetSub1              (Get default Subdirectory)
  876. Class : Disk
  877. Level : DOS
  878.  
  879. The GetSub1 routine gets the current subdirectory on a
  880. specified drive. Unlike GetSub, it places a backslash at the
  881. start of the name.  It also returns an error code, which allows
  882. you to see if there was a disk error.
  883.  
  884.    SubDir$ = SPACE$(65)
  885.    GetSub1 Drive$, SubDir$, SubLen%, ErrCode%
  886.    SubDir$ = LEFT$(SubDir$, SubLen%)
  887.  
  888. Drive$     letter of the drive to check
  889. -------
  890. SubDir$    name of the current subdirectory. Init to 65+ chars
  891. SubLen%    length of the subdirectory name
  892. ErrCode%   error code: 0 if no error, else DOS Error
  893.  
  894.  
  895. Name  : GetTimeF             (Get Time of File)
  896. Class : Disk / Time
  897. Level : DOS
  898.  
  899. The GetTimeF routine returns the time of a file matched by
  900. FindFirstF or FindNextF.
  901.  
  902. Routines in this series include:
  903.    FindFirstF, FindNextF, GetNameF, GetAttrF, GetDateF, GetTimeF, GetSizeFL
  904.  
  905.    GetTimeF Hour%, Minute%, Second%
  906.  
  907. -------
  908. Hour%      hour
  909. Minute%    minute
  910. Second%    second
  911.  
  912. Name  : GetTView             (Get TopView)
  913. Class : Miscellaneous
  914. Level : BIOS
  915.  
  916. This routine tells you whether TopView or a compatible multitasker (such as
  917. TaskView or DESQview) is loaded.
  918. See also GetDView, GetTVScreen, UpdTVScreen.
  919.  
  920.    GetTView Installed%
  921.  
  922. -------
  923. Installed%   whether a TopView-type multitasker is loaded (0 no)
  924.  
  925. Name  : GetTVScreen          (Get TopView Screen address)
  926. Class : Display / Miscellaneous
  927. Level : BIOS
  928.  
  929. GetTVScreen returns the address of the screen buffer used by a TopView-type
  930. multitasker.  This allows you to use direct screen access while remaining
  931. within the windows allocated to your program by the multitasker.
  932.  
  933. You must tell the multitasker the address of the screen you would be writing
  934. to if the multitasker was not installed.  Specify a segment of &HB000 if
  935. using an MDA or Hercules, or a segment of &HB800 for CGA, EGA, MCGA or VGA.
  936. The offset should always be 0.  This is for use in text modes.
  937.  
  938. The routine will return with the new segment and offset for you to use.
  939. These values can be used with any PBClone screen routine that accepts a
  940. segment and offset-- DQPrint and DXQPrint, for example.
  941.  
  942. Note that not all TopView-compatible multitaskers will automatically update
  943. the screen from the buffer.  The UpdTVScreen routine allows you to force a
  944. screen update.
  945. See also GetDView, GetTView, UpdTVScreen.
  946.  
  947.    GetTVScreen DSeg%, DOfs%
  948.  
  949. DSeg%       segment of desired screen
  950. DOfs%       offset of desired screen
  951. -------
  952. DSeg%       segment of screen buffer
  953. DOfs%       offset of screen buffer
  954.  
  955.  
  956. Name  : KbdType
  957. Class : Input / Equipment
  958. Level : Clone
  959.  
  960. This routine tells you if an enhanced (101-key) keyboard is available.
  961.  
  962. KbdType differs from the ProBas routine of the same name in that it has
  963. additional error checking.  If it is not entirely sure that an enhanced
  964. keyboard is available, it plays safe and assumes there isn't one.  This
  965. avoids possible disaster on older PCs.
  966.  
  967.    KbdType Enhanced%
  968.  
  969. -------
  970. Enhanced%    whether keyboard is of the enhanced type (0 no)
  971.  
  972.  
  973. Name  : LClose
  974. Class : Memory
  975. Level : BIOS
  976.  
  977. This routine closes a block of expanded memory that was opened for access by
  978. LOpen.  It is important to close the block when you are finished with it, to
  979. return it to the free memory pool.
  980.  
  981. Routines in this suite include: LOpen, LGet, LPut, LClose.
  982.  
  983.    LClose EMSHandle%
  984.  
  985. EMSHandle%    handle of the expanded memory block
  986.  
  987.  
  988. Name  : LGet
  989. Class : Memory
  990. Level : BIOS
  991.  
  992. This routine gets a block of data from expanded memory that was opened for
  993. access by LOpen.  The amount of data is specified in words; one word is the
  994. same as two bytes.  An integer takes up a word, long integers and single
  995. precision numbers require two words, and double precision numbers take four.
  996.  
  997. Routines in this suite include: LOpen, LGet, LPut, LClose.
  998.  
  999.    LGet EMSHandle%, DSeg%, DOfs%, Words%
  1000.  
  1001. EMSHandle%    handle of the expanded memory block
  1002. DSeg%         segment of place to store data
  1003. DOfs%         offset of place to store data
  1004. Words%        words to get from expanded memory
  1005.  
  1006.  
  1007. Name  : LOpen
  1008. Class : Memory
  1009. Level : BIOS
  1010.  
  1011. This routine opens a block of expanded memory for access.  The size of the
  1012. block is specified in words; one word is the same as two bytes.  An integer
  1013. takes up a word, long integers and single precision numbers require two
  1014. words, and double precision numbers take four.  This allows you to store up
  1015. to 64K in each EMS block that you open.
  1016.  
  1017. Note that LOpen expects an EMS driver to be available.  If you are not
  1018. certain on this point, use GetLIMM beforehand to make sure.
  1019.  
  1020. Routines in this suite include: LOpen, LGet, LPut, LClose.
  1021.  
  1022.    LOpen Words%, EMSHandle%, ErrCode%
  1023.  
  1024. Words%        size of expanded memory block to allocate
  1025. -------
  1026. EMSHandle%    handle of the expanded memory block
  1027. ErrCode%      error code (0 if no error)
  1028.  
  1029. Name  : LPut
  1030. Class : Memory
  1031. Level : BIOS
  1032.  
  1033. This routine puts a block of data into expanded memory that was opened for
  1034. access by LOpen.  The amount of data is specified in words; one word is the
  1035. same as two bytes.  An integer takes up a word, long integers and single
  1036. precision numbers require two words, and double precision numbers take four.
  1037.  
  1038. Routines in this suite include: LOpen, LGet, LPut, LClose.
  1039.  
  1040.    LPut EMSHandle%, DSeg%, DOfs%, Words%
  1041.  
  1042. EMSHandle%    handle of the expanded memory block
  1043. DSeg%         segment of place from which to get data
  1044. DOfs%         offset of place from which to get data
  1045. Words%        words to put into expanded memory
  1046.  
  1047. Name  : LRotate
  1048. Class : String
  1049. Level : Any
  1050.  
  1051. Many years ago, I wrote one of the first terminal programs for the PC.  It
  1052. died a horrible death when Qmodem came out... sigh.  This routine comes from
  1053. that experience.  It rotates the characters in a string left once (e.g.,
  1054. "ABCDE" becomes "BCDEA").  I used this in my routine to dial a list of BBSes,
  1055. skipping to the next one if the current one was busy.
  1056.  
  1057. LRotate can also be handy for things like scrolling a long message across the
  1058. screen (you just PRINT LEFT$(Message$, 80); then delay a bit, LRotate and do
  1059. it again).
  1060.  
  1061.    LRotate St$
  1062.  
  1063. St$     string to be rotated left once
  1064. -------
  1065. St$     string after being rotated left once
  1066.  
  1067.  
  1068. Name  : NameCase                (Called by DoorFrame - DON'T DELETE!)
  1069. Class : String
  1070. Level : Any
  1071.  
  1072. This routine provides a specialized uppercase/lowercase converter designed
  1073. especially for names.  It converts the first letter in each word in a string
  1074. to uppercase, with the rest of the word being converted to lowercase.
  1075.  
  1076. See also NameCase2, the FUNCTION version of this routine.
  1077.  
  1078.    NameCase St$
  1079.  
  1080. St$         string to process
  1081. -------
  1082. St$         processed string
  1083.  
  1084.  
  1085. Name  : NameCase2$           (Name Case)
  1086. Class : String
  1087. Level : Any
  1088.  
  1089. This routine provides a specialized uppercase/lowercase
  1090. converter designed especially for names.  It converts the first
  1091. letter in each word in a string to uppercase, with the rest of
  1092. the word being converted to lowercase.
  1093.  
  1094. See also NameCase, the SUB version of this routine.
  1095.  
  1096.    Result$ = NameCase2$(St$)
  1097.  
  1098. St$         string to process
  1099. -------
  1100. Result$     processed string
  1101.  
  1102.  
  1103. Name  : Processor
  1104. Class : Equipment
  1105. Level : Any
  1106.  
  1107. Processor returns the type of processor (CPU) installed.
  1108.  
  1109. Results are returned as follows:
  1110.  
  1111.    0    NEC V20
  1112.    1    8088 or 8086
  1113.    2    80186
  1114.    3    80286
  1115.    4    80386 or 80486
  1116.  
  1117.    Processor ProcType%
  1118.  
  1119. -------
  1120. ProcType%    type of CPU (see above)
  1121.  
  1122. Name  : Retries
  1123. Class : Disk
  1124. Level : DOS 3.1+
  1125. This routine allows you to adjust the handling of file-sharing errors.  When
  1126. such an error occurs, DOS normally retries 3 times, with a wait of 1 between
  1127. tries.  This allows temporary conditions, such as someone else using the file
  1128. you want to access, to clear up.  In many cases, though, you may want to
  1129. change this delay.  A shorter delay will improve response time, allowing your
  1130. program to handle the error more quickly.  A longer delay may be more suited
  1131. for a busy network, allowing the request to proceed after a reasonable
  1132. waiting period.
  1133.  
  1134. The delay period between each retry is unfortunately machine-dependent, i.e.,
  1135. you will need larger delays on faster machines to achieve the same effect.
  1136. This can only be considered a flaw in DOS.
  1137.  
  1138. Note that shorter waiting periods will improve response time for your
  1139. program, but may adversely affect the network.  Normally, you should use the
  1140. longest waiting period with which you feel comfortable.
  1141.  
  1142.    Retries Times%, WaitTime%
  1143.  
  1144. Times%     number of times to retry if a file-sharing violation occurs
  1145. WaitTime%  amount of time to delay between retries
  1146.  
  1147. Name  : Reverse              (Reverse)
  1148. Class : String
  1149. Level : Any
  1150. This little fellow reverses the order of the characters in a
  1151. string.  It is one of the vital components of RInstr, but other
  1152. than that I see no real use for it.  On the other hand, George
  1153. Boole thought that Boolean logic was of solely theoretical
  1154. interest, and yet without it there would be no computers. I
  1155. leave it to you to find the earth-shattering possibilities of
  1156. Reverse!
  1157.  
  1158.    Reverse St$
  1159.  
  1160. St$      string to be reversed
  1161. -------
  1162. St$      reversed string
  1163.  
  1164. Name  : RInstr               (Reverse INSTR)
  1165. Class : String
  1166. Level : Any
  1167.  
  1168. Like INSTR, this routine tells you the position of a substring
  1169. within a string.  A "reverse" search is used, however-- whereas
  1170. INSTR tells you the first match, RInstr tells you the last
  1171. match.  Similarly, whereas INSTR will tell you that a null
  1172. search string matches the main string at the first position,
  1173. RInstr will match on the last position.  Of course, most of the
  1174. time you won't be searching for a null string!
  1175.  
  1176.    RInstr MainSt$, SeekSt$, Posn%
  1177.  
  1178. MainSt$    string to search
  1179. SeekSt$    string for which to search
  1180. -------
  1181. Posn%      position of substring within main string (0 no match)
  1182.  
  1183.  
  1184. Name  : Sec2Time$            (Seconds to Time)
  1185. Class : Time
  1186. Level : Any
  1187. This routine converts the number of seconds past midnight into
  1188. a time string.
  1189.  
  1190.    TimeSt$ = Sec2Time$(Seconds&)
  1191.  
  1192. Seconds&   number of seconds past midnight
  1193. -------
  1194. TimeSt$    time string (TIME$ format)
  1195.  
  1196. Name  : SetError
  1197. Class : Miscellaneous
  1198. Level : DOS
  1199.  
  1200. The SetError routine allows you to set the "error level" to be returned by
  1201. DOS when your program ends.  This is particularly handy for returning
  1202. information to batch files.
  1203. Note that SetError is best used just before your program ENDs, to avoid
  1204. complications.
  1205.  
  1206.    SetError ErrorLevel%
  1207.  
  1208. ErrorLevel%   exit code to be returned by your program
  1209.  
  1210. Name  : SetKbd
  1211. Class : Input
  1212. Level : Clone
  1213. The SetKbd routine allows you to set the state of any of the four keyboard
  1214. toggles: Insert, Caps lock, Num lock, and Scroll Lock.  You can give your
  1215. input routines a professional touch by setting this toggles instead of making
  1216. the user remember to do so.
  1217.  
  1218. It's considered proper to restore the original keyboard toggles before your
  1219. program exits, unless of course the purpose of the program is to leave the
  1220. toggles in a particular state!  The GetKbd routine can be used in conjunction
  1221. with SetKbd to do this.
  1222.  
  1223.    SetKbd Insert%, Caps%, Num%, Scrl%
  1224.  
  1225. Insert%    whether to turn on "insert" mode (0 if no)
  1226. Caps%      whether to turn on "caps lock" (0 if no)
  1227. Num%       whether to put the keypad into numeric mode (0 if no)
  1228. Scrl%      whether to turn on "scroll lock" (0 if no)
  1229.  
  1230. Name  : Subexist             (Subdirectory Existence)
  1231. Class : Disk
  1232. Level : DOS
  1233. This routine lets you see if a given subdirectory actually
  1234. exists.  This isn't really necessary for the PBClone file
  1235. routines, which will return an appropriate error code, but it's
  1236. a valuable safeguard when using the BASIC OPEN statement.
  1237.  
  1238.    SubExist SubDir$, Found%
  1239.  
  1240. SubDir$   name of the subdirectory to look for
  1241. -------
  1242. Found%    whether the subdirectory was found (0 if no)
  1243.  
  1244. Name  : Time2Sec&            (Time to Seconds)
  1245. Class : Time
  1246. Level : Any
  1247.  
  1248. This routine converts a time string into the number of seconds
  1249. past midnight. This is convenient if you want to find the
  1250. difference between two times or to calculate what time it will
  1251. be after a given interval.
  1252.  
  1253.    Seconds& = Time2Sec&(TimeSt$)
  1254.  
  1255. TimeSt$    time string (TIME$ format)
  1256. -------
  1257. Seconds&   number of seconds past midnight
  1258.  
  1259. Name  : TInstr               (Typed INSTR)
  1260. Class : String
  1261. Level : Any
  1262.  
  1263. As you might guess from the "Instr" part of the name, this
  1264. routine searches a string.  Instead of searching for a specific
  1265. character or substring, though, it looks for a specific type of
  1266. character-- letters, numbers, control codes, or whatever.  You
  1267. can search for the first of a combination of types, too, which
  1268. also allows searching for "anything but" a specific type.
  1269.  
  1270. The character type code is specified by adding any of the
  1271. following:
  1272.  
  1273.     1    alphabetic
  1274.     2    numeric
  1275.     4    symbolic
  1276.     8    control
  1277.    16    graphics
  1278.    32    space
  1279. The TInstr routine is handy for parsing and cleaning up user
  1280. input, among other uses.
  1281.  
  1282.    TInstr St$, ChrType%, Place%
  1283.  
  1284. St$          string to search
  1285. ChrType%     type of character(s) to search for
  1286. -------
  1287. Place%       position of first char of desired type, or 0
  1288.  
  1289.  
  1290. Name  : UnCalcAttr           (Undo Calculated Attribute)
  1291. Class : Display
  1292. Level : Any
  1293.  
  1294. Many of the display routines in this library require an
  1295. "attribute" rather than foreground and background colors.  An
  1296. attribute is a combination of the foreground and background
  1297. colors in a format which is used by all types of displays when
  1298. in text mode.  The UnCalcAttr routine allows you to decode the
  1299. original colors given the attribute.
  1300.  
  1301. Foreground colors are usually specified as 0-31, with
  1302. backgrounds as 0-7.
  1303.  
  1304.    UnCalcAttr Foreground%, Background%, Attr%
  1305.  
  1306. Attr%         color "attribute"
  1307. -------
  1308. Foreground%   foreground color
  1309. Background%   background color
  1310.  
  1311. Name  : UpdTVScreen          (Update TopView Screen)
  1312. Class : Display
  1313. Level : BIOS
  1314.  
  1315. UpdTVScreen tells a TopView-compatible multitasker to update the screen using
  1316. a specified screen buffer (use GetTVScreen to get the buffer location).  Some
  1317. multitaskers will do this automatically, but some won't.  It's safe to use
  1318. this routine either way.
  1319.  
  1320. See also GetDView, GetTView, GetTVScreen.
  1321.  
  1322.    UpdTVScreen DSeg%, DOfs%
  1323.  
  1324. DSeg%       segment of screen buffer
  1325. DOfs%       offset of screen buffer
  1326.  
  1327.  
  1328. Name  : WinCheck             (Windows Check)
  1329. Class : Equipment
  1330. Level : BIOS
  1331.  
  1332. The WinCheck routine tells you what version of Microsoft Windows is in use,
  1333. if any.  It returns the results as two integers containing the major and
  1334. minor version numbers.  For instance, Windows 3.0 would return a major number
  1335. of 3, minor 0.  Windows/386 v2.x will be identified as 2.0.  If Windows is
  1336. not running, 0.0 will be returned.  NOTE that this routine is not able to
  1337. detect Windows 1.x versions!
  1338.  
  1339.    WinCheck MajorV%, MinorV%
  1340.  
  1341. -------
  1342. MajorV%   major part of the Windows version
  1343. MinorV%   minor part of the Windows version
  1344.  
  1345.